# Contributor: William Walker <w_walker@icloud.com>
# Maintainer: William Walker <w_walker@icloud.com>
pkgname=zarf
pkgver=0.31.0
pkgrel=2
pkgdesc="DevSecOps for Air Gap & Limited-Connection Systems"
url="https://zarf.dev/"
# not useful/supported elsewhere
arch="aarch64 x86_64"
license="Apache-2.0"
makedepends="go nodejs npm"
source="$pkgname-v$pkgver.tar.gz::https://github.com/defenseunicorns/zarf/archive/refs/tags/v$pkgver.tar.gz"
# tests are integration tests that need a full setup
options="net !check"

build() {
	local ldflags="
		-X github.com/defenseunicorns/zarf/src/config.CLIVersion=v$pkgver
		-X k8s.io/component-base/version.gitVersion=v0.0.0+zarfv$pkgver
		-X k8s.io/component-base/version.gitCommit=alpine
		-X k8s.io/component-base/version.buildDate=null
		"
	go build -ldflags "$ldflags" -o build/zarf main.go
}

package() {
	install -Dm755 build/zarf -t "$pkgdir"/usr/bin
}

sha512sums="
376efdec20f1ec69546b6d19a7c83d6ac6536e012d5a764a59566553c38c579d74145ba05a58f13c0c04b3b2daba3e8394b6427acb7dc28ab5ae54c079658fee  zarf-v0.31.0.tar.gz
"
